package com.ctgu.edu.service.impl;

import com.ctgu.edu.dao.ResumeMapper;
import com.ctgu.edu.dao.SeekerMapper;
import com.ctgu.edu.pojo.Resume;
import com.ctgu.edu.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
public class ResumeServiceImpl implements ResumeService {

    @Autowired
    @Qualifier("resumeMapper")
    private ResumeMapper resumeMapper;

    public void setResumeMapper(ResumeMapper resumeMapper) {
        this.resumeMapper = resumeMapper;
    }

    //增
    public void addResume(Resume resume) {
        resumeMapper.addResume(resume);
    }

    //删
    public void deleteResumeById(Integer resumeId) {
        resumeMapper.deleteResumeById(resumeId);
    }

    //改
    public void updateResume(Resume resume) {
        resumeMapper.updateResume(resume);
    }

    //查
    public Resume getResumeById(Integer resumeId) {
        return resumeMapper.getResumeById(resumeId);
    }

    public Resume getResumeByOwnerId(Integer seekerId) {
        return resumeMapper.getResumeByOwnerId(seekerId);
    }
}
